/**
 */
package com.dingpeikeji.quickdeer.core.modules.buse.entity;

import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import java.util.Date;

import com.dingpeikeji.quickdeer.core.common.persistence.DataEntity;
import com.dingpeikeji.quickdeer.core.modules.sys.entity.Office;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.List;
import com.google.common.collect.Lists;

/**
 * 巴士管理Entity
 * @author Zhaoy
 * @version 2016-05-26
 */
public class TCompBuse extends DataEntity<TCompBuse> {
	
	private static final long serialVersionUID = 1L;
	private String busid;		// 主键
	private Office office;		// office_id
	private String vehiclename;		// 车辆型号
	private String brand;		// 车辆品牌
	private String busclass;		// 车辆等级
	private String enginetype;		// 动力类型
	private String licenseno;		// 车牌号
	private String seats;		// 座位数
	private String certino;		// 车辆营运证号
	private String bodycolor;		// 车辆颜色
	private String permittype;		// 行车类型
	private String busstatus;		// 车辆状态
	private Date regdate;		// 上牌日期
	private Date purchasedate;		// 购车日期
	private String travelins;		// 乘运险
	private String thirdins;		// 第三者责任险
	private String ownerid;		// 联系人ID
	private String owner;		// 联系人
	private String ownertel;		// 联系人手机
	private Date inspectdate;		// 年检日期
	private Date ddate;		// 二维日期
	private Date startdate;		// 开始时间
	private Date enddate;		// 结束时间
	private List<TBuseExchge> tBuseExchgeList = Lists.newArrayList();		// 子表列表
	
	public TCompBuse() {
		super();
	}

	public TCompBuse(String id){
		super(id);
	}

	public String getBusid() {
		return busid;
	}

	public void setBusid(String busid) {
		this.busid = busid;
	}
	
	@NotNull(message="office_id不能为空")
	public Office getOffice() {
		return office;
	}

	public void setOffice(Office office) {
		this.office = office;
	}
	
	@Length(min=1, max=200, message="车辆型号长度必须介于 1 和 200 之间")
	public String getVehiclename() {
		return vehiclename;
	}

	public void setVehiclename(String vehiclename) {
		this.vehiclename = vehiclename;
	}
	
	@Length(min=1, max=50, message="车辆品牌长度必须介于 1 和 50 之间")
	public String getBrand() {
		return brand;
	}

	public void setBrand(String brand) {
		this.brand = brand;
	}
	
	@Length(min=1, max=10, message="车辆等级长度必须介于 1 和 10 之间")
	public String getBusclass() {
		return busclass;
	}

	public void setBusclass(String busclass) {
		this.busclass = busclass;
	}
	
	@Length(min=1, max=10, message="动力类型长度必须介于 1 和 10 之间")
	public String getEnginetype() {
		return enginetype;
	}

	public void setEnginetype(String enginetype) {
		this.enginetype = enginetype;
	}
	
	@Length(min=1, max=20, message="车牌号长度必须介于 1 和 20 之间")
	public String getLicenseno() {
		return licenseno;
	}

	public void setLicenseno(String licenseno) {
		this.licenseno = licenseno;
	}
	
	public String getSeats() {
		return seats;
	}

	public void setSeats(String seats) {
		this.seats = seats;
	}
	
	@Length(min=0, max=20, message="车辆营运证号长度必须介于 0 和 20 之间")
	public String getCertino() {
		return certino;
	}

	public void setCertino(String certino) {
		this.certino = certino;
	}
	
	@Length(min=0, max=1, message="车辆颜色长度必须介于 0 和 1 之间")
	public String getBodycolor() {
		return bodycolor;
	}

	public void setBodycolor(String bodycolor) {
		this.bodycolor = bodycolor;
	}
	
	@Length(min=0, max=20, message="行车类型长度必须介于 0 和 20 之间")
	public String getPermittype() {
		return permittype;
	}

	public void setPermittype(String permittype) {
		this.permittype = permittype;
	}
	
	@Length(min=1, max=1, message="车辆状态长度必须介于 1 和 1 之间")
	public String getBusstatus() {
		return busstatus;
	}

	public void setBusstatus(String busstatus) {
		this.busstatus = busstatus;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="上牌日期不能为空")
	public Date getRegdate() {
		return regdate;
	}

	public void setRegdate(Date regdate) {
		this.regdate = regdate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="购车日期不能为空")
	public Date getPurchasedate() {
		return purchasedate;
	}

	public void setPurchasedate(Date purchasedate) {
		this.purchasedate = purchasedate;
	}
	
	@Length(min=1, max=10, message="乘运险长度必须介于 1 和 10 之间")
	public String getTravelins() {
		return travelins;
	}

	public void setTravelins(String travelins) {
		this.travelins = travelins;
	}
	
	@Length(min=1, max=10, message="第三者责任险长度必须介于 1 和 10 之间")
	public String getThirdins() {
		return thirdins;
	}

	public void setThirdins(String thirdins) {
		this.thirdins = thirdins;
	}
	
	public String getOwnerid() {
		return ownerid;
	}

	public void setOwnerid(String ownerid) {
		this.ownerid = ownerid;
	}
	
	@Length(min=1, max=30, message="联系人长度必须介于 1 和 30 之间")
	public String getOwner() {
		return owner;
	}

	public void setOwner(String owner) {
		this.owner = owner;
	}
	
	@Length(min=1, max=20, message="联系人手机长度必须介于 1 和 20 之间")
	public String getOwnertel() {
		return ownertel;
	}

	public void setOwnertel(String ownertel) {
		this.ownertel = ownertel;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getInspectdate() {
		return inspectdate;
	}

	public void setInspectdate(Date inspectdate) {
		this.inspectdate = inspectdate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getDdate() {
		return ddate;
	}

	public void setDdate(Date ddate) {
		this.ddate = ddate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="开始时间不能为空")
	public Date getStartdate() {
		return startdate;
	}

	public void setStartdate(Date startdate) {
		this.startdate = startdate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="结束时间不能为空")
	public Date getEnddate() {
		return enddate;
	}

	public void setEnddate(Date enddate) {
		this.enddate = enddate;
	}
	
	public List<TBuseExchge> getTBuseExchgeList() {
		return tBuseExchgeList;
	}

	public void setTBuseExchgeList(List<TBuseExchge> tBuseExchgeList) {
		this.tBuseExchgeList = tBuseExchgeList;
	}
}
